import React from 'react'
import Logo from '../../component/logo/Logo'
import {
 WingBlank,
 Button,
 WhiteSpace,
 List,
 InputItem
} from 'antd-mobile'
import 'antd-mobile/dist/antd-mobile.css'

class Login extends React.Component{

	constructor(props){
		super(props)
		this.login = this.login.bind(this)
		this.register = this.register.bind(this)
	}

	login(){

		this.props.history.push('/login')
	}

	register(){

		this.props.history.push('/register')
	}



	render(){
		return (
				<div>
				    <Logo></Logo>
				    <h2 style={{textAlign:'center'}}>登录页</h2>
				    <WingBlank>
				    	<List>
				    		<InputItem>用户</InputItem>
				    		<WhiteSpace />
				    		<InputItem>密码</InputItem>
				    	</List>
				    </WingBlank>
				    <WingBlank>
				    	<Button type="primary" onClick={this.login}>登录</Button>
				    </WingBlank>
				    <WhiteSpace />
				     <WingBlank>
				    	<Button type="primary" onClick={this.register}>注册</Button>
				    </WingBlank>
				</div>
			)
	}
}

export default Login